Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audit Fix #285 - Cycle payment should never exceed cycle payment amt #42

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ethereumdegen
Copy link
Collaborator

No description provided.

@@ -121,10 +126,13 @@ library V2Calculations {
// Max payable amount in a cycle
// NOTE: the last cycle could have less than the calculated payment amount

//the amount owed for the cycle should never exceed the current payment cycle amount so we use min here
uint256 owedAmountForCycle = Math.min( ((_bid.terms.paymentCycleAmount * owedTime)+interest_ ) /
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if we just got rid of the left hand side of this Math.min ???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant